import request from "@/utils/request";

// 查询货位列表
export function getWarehouseLocationList(query) {
  return request({
    url: "/mes/wm/area/list",
    method: "get",
    params: query,
  });
}

// 查询货位详细
export function getWarehouseLocationItem(areaId) {
  return request({
    url: "/mes/wm/area/" + areaId,
    method: "get",
  });
}

// 新增货位
export function addWarehouseLocation(data) {
  return request({
    url: "/mes/wm/area",
    method: "post",
    data: data,
  });
}

// 修改货位
export function updateWarehouseLocation(data) {
  return request({
    url: "/mes/wm/area",
    method: "put",
    data: data,
  });
}

// 删除货位
export function delWarehouseLocation(WarehouseLocationId) {
  return request({
    url: "/mes/wm/area/" + WarehouseLocationId,
    method: "delete",
  });
}
